<script>
function Person(name, age) {
  this.name = name;
  this.age = age
}
// 静态属性
Person.version = 888
Person.say = function() {}
Person.prototype.say = function() {
  console.log('Hello World')
}
Person.prototype.version = 888

function Star() {}

Star.prototype = new Person('王思聪', 20)
Star.prototype.constructor = Star

const s1 = new Star()
console.log(s1.name)
console.log(s1.age)
s1.say()

const s2 = new Star('张学友', 22)
console.log(s2.name)
console.log(s2.age)
s2.say()
</script>